package cn.zhentao;

import cn.zhentao.config.JwtConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication(exclude = {
    // 禁用H2数据库 - 只使用rw556wMySQL
    org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.class,
    // 禁用Redis自动配置 - 验证码登录使用HttpSession
    org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration.class,
    org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration.class,
    org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration.class
})
@ComponentScan(basePackages = {
    "cn.zhentao.controller",
    "cn.zhentao.config",
    "cn.zhentao.service",
    "cn.zhentao.service.impl",
    "cn.zhentao.util",
    "cn.zhentao.interceptor"
})
@MapperScan("cn.zhentao.mapper")
@EnableConfigurationProperties({JwtConfig.class, cn.zhentao.config.DashScopeConfig.class})
public class UserLoginApplication {
    public static void main(String[] args) {
        SpringApplication.run(UserLoginApplication.class, args);
        System.out.println("AI User Login Service started successfully!");
    }
}
